package cn.edu.seu.cose.qol.util;

import java.util.HashMap;
import java.util.Map;

public final class EnvironmentVariable {
	
	public static final String REAL_PATH = "realpath";
	
	private static EnvironmentVariable _singleton;
	static {
		_singleton = new EnvironmentVariable();
	}
	
	private Map<String, String> _variableMap;
	
	public static synchronized EnvironmentVariable getInstance() {
		return _singleton;
	}
	
	private EnvironmentVariable() {
		_variableMap = new HashMap<String, String>();
	}
	
	public boolean containsKey(String key) {
		return _variableMap.containsKey(key);
	}
	
	public String put(String key, String value) {
		return _variableMap.put(key, value);
	}
	
	public String get(String key) {
		return _variableMap.get(key);
	}

}
